import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PhomepageComponent } from './phomepage/phomepage.component';
import { DoctorhomeComponent } from './doctorhome/doctorhome.component';
import { NotfindComponent } from './notfind/notfind.component';
import { PayresultComponent } from './payresult/payresult.component';
import { BlankComponent } from './blank/blank.component';
import { AuthorizedloginComponent } from './authorizedlogin/authorizedlogin.component'
import { TiaozComponent } from './tiaoz/tiaoz.component'

const routes: Routes = [

  {
    path: '',
    redirectTo: '/author',
    pathMatch: 'full'
  },
  // 医院信息模块懒加载
  {
    path: 'hospinfo',
    loadChildren: './hospinfo/hospinfo.module#HospInfoModule'
  },

  //预约挂号模块懒加载
  {
    path: 'appoint',
    loadChildren: './appoint/appoint.module#AppointModule'
  },
  //就诊人模块
  {
    path: 'patient',
    loadChildren: './patient/patient.module#PatientModule'
  },
  //预约记录模块
  {
    path: 'appointrecord',
    loadChildren: './appointrecord/appointrecord.module#AppointRecordModule'
  },
  //检验检查模块
  {
    path: 'inspectionrecord',
    loadChildren: './inspectionrecord/inspectionrecord.module#InspectionRecordModule'
  },
  //就医记录模块
  {
    path: 'medicalrecord',
    loadChildren: './medicalrecord/medicalrecord.module#MedicalRecordModule'
  },
  //缴费记录模块
  {
    path: 'outpatientpayrecord',
    loadChildren: './outpatientpayrecord/outpatientpayrecord.module#OutpatientpayRecordModule'
  },
  //缴费模块
  {
    path: 'outpatientpay',
    loadChildren: './outpatientpay/outpatientpay.module#OutpatientpayModule'
  },
  {
    path: 'homepage',
    component: PhomepageComponent
  },
  {
    path: 'author',
    component: AuthorizedloginComponent
  },
  {
    path: 'doctorhome',
    component: DoctorhomeComponent
  },
  //未找到
  {
    path: '404',
    component: NotfindComponent
  },
  {
    path: 'payrsult',
    component: PayresultComponent
  },

  {
    path: 'blank',
    component: BlankComponent
  }
  ,

  {
    path: 'tiaoz',
    component: TiaozComponent
  }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
